<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <script type="text/javascript">
    function regist() {
        //登录跳转
        location.href="/login_user";
    }
    function manager_login(){
        location.href="/manager";
    }
    </script>
</head>
{% load static %}
<body style="background-image: url({% static 'images/login_4.gif' %});
        background-size:100% 200%;background-repeat:no-repeat;">
    <div id="maxname" style="width:1500px;height:700px;">
          <div id="menu" style="height:700px;width:40%;float:left;">
          </div>
        <div id="content" style="height:400px;width:37%;float:left;margin-top: 250px;background-image: url({% static 'images/login_2.gif' %});background-repeat:no-repeat; background-size:50% 90%">
            <form action="{% url 'App:register'%}" method="post" style="margin-top: 60px">
                {% csrf_token %}
                <a style="color: #00a2d4">&nbsp;用&nbsp;户&nbsp;名:</a><input type="text" name="username" required autocomplete="off" autofocus><br>
                {%  for error in form.username.errors %}
                    <a style="color: red">{{ error }}</a>
                {% endfor %}
                <br>
                <a style="color: #00a2d4">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:</a><input type="password" name="password" required><br>
                <a style="color: red">{{ form.password.errors }}</a>
                <br>
                <a style="color: #00a2d4">注册时间:</a><input type="datetime-local" name="regtime"><br>
                <a style="color: red">{{ form.regtime.errors }}</a>
                <br>
                <a style="color:#00a2d4;">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:</a><input type="radio" name="sex" value="女">女
                <input type="radio" name="sex" value="男">男
                <a style="color: red">{{ form.sex.errors }}</a>
                <br>
                <a style="color: red">{{ error_name }}</a><br>
                <input type="submit" value="注册" style="width:85px;height:30px;background-color: #d4f8ff">
                <input type="button" class="loginbtn" value="用户登录" onclick="regist()" style="width:85px;height:30px;background-color: #d4f8ff"/>
                <input type="button" class="loginbtn" value="管理员登录" onclick="manager_login()" style="background-color: #d4f8ff;height: 30px">

            </form>
        </div>
    </div>
</body>
</html>